<template>
	<view class="played">
		<!-- 我玩过的剧本 -->
		<myScriptDetail :screenplay="screenplay"></myScriptDetail>
	</view>
</template>

<script>
	import myScriptDetail from '@/components/myScriptDetail.vue'
	export default {
		components:{
			myScriptDetail
		},
		data() {
			return {
				screenplay:[],
			}
		},
		methods: {
			//获取玩过的剧本
			getPlayedScript(){
				// 请求接口
				uni.request({
					url:'http://124.220.177.66:8082/juben/getPlayedScript',
					method:'POST',
					data:{
						"openID": "wx999" //openID
					},
					success: (res) => {
						console.log('查询用户玩过的剧本',res);
						this.screenplay = res.data.data
					}
				})
			}
		},
		
		onLoad(option) {
			console.log('接路由信息openID',option.item);
		},
		created(){
			this.getPlayedScript()
		}
	}
</script>

<style lang="less">
	// 底色
	@bColor:#0D141F;
	// 主色
	@mColor:#623685;
	page{
		background-color: @bColor;
	}
</style>
